using IQIGame.Onigao.Framework;
using IQIGame.Onigao.Game;

namespace IQIGame.Onigao.GamePlay
{
    public class UIN_WeaknessItem : UIBaseNode
    {
        #region Template Generate,don't modify

        protected partial class UIB_WeaknessItem
        {
            #region ObjectBinding Generate

            public IQIGame.Onigao.Framework.ExImage image_Icon { protected set; get; }

            public virtual void InitBinding(ObjectBinding __binding)
            {
                __binding.TryGetVariableValue<IQIGame.Onigao.Framework.ExImage>("image_Icon", out var __tbv0);
                this.image_Icon = __tbv0;
            }

            #endregion ObjectBinding Generate
        }

        #endregion Template Generate,don't modify

        protected UIB_WeaknessItem ui { get; set; }


        protected override void BeforeInit()
        {
            ui = new UIB_WeaknessItem();
            ui.InitBinding(this.csObjBind);
        }

        protected override void OnInit()
        {

        }

        protected override void OnShow()
        {

        }

        protected override void OnHide()
        {

        }

        public void ShowByData(EWeaknessType rType)
        {
            this.Show();
            this.SetImageSprite(this.ui.image_Icon, PathConstant.GetIconTypePath("MonsterWeak_Image_" + (int)rType));
        }

        protected override void OnDispose()
        {

        }
    }
}
